<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <meta name="author" content="Flying hormone" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta charset="UTF-8">
        <link rel="stylesheet" href="../css/media.css" />
        <link rel="stylesheet" href="../css/mui.min.css" />
        <link rel="stylesheet" href="../css/head_foot.css" />
        <script type="text/javascript" src="../js/jquery-1.9.1.js"></script>
        <script type="text/javascript" src="../js/jquery.Query.js" ></script>
        <script type="text/javascript" src="../js/jquery-cookie.js"></script>
        <script type="text/javascript" src="../js/mui.min.js"></script>
        <script type="text/javascript" src="../js/appcan.js"></script>
        <script type="text/javascript" src="../js/appcan.control.js"></script>
        <script type="text/javascript" src="../js/common.js" ></script>
		<title>推送列表</title>
		<style>
			
			.mui-table-view-cell>a:not(.mui-btn){ width: 70%; float: left;}
			
			.mui-table-view-cell>p{  line-height:1.5em;}
			.mui-icon{ font-size: 1em;}
			.mui-table-view .mui-media-object.mui-pull-left{ border-radius: 50%;}
			.moban_btn{ position: absolute; top: 0; right: 0;}
			.moban_btn a{  display: inline-block; width: 4em; text-align: center; border: 1px solid #ddd; border-radius: 0.3125em; margin-right: 0.3125em; margin-top: 0.625em;}
			.tishi_btn{ border-radius: 50%; background: #f34628; color: #fff; position: absolute; left: 2.5em; top: 0.3125em; width: 1.1em; height: 1.1em; text-align: center; line-height: 1.1em;}
			.mui-media-body{line-height: 1.2em;}
			.mui-table-view .mui-media-object.mui-pull-left{ line-height: inherit; max-width: 2em; height: 2em; width: 2em;}
			.tishi_btn{ border-radius: 50%;
                background: #f34628;
                color: #fff;
                position: absolute;
                left: 4.3em;
                top: 1.9em;
                width: 0.4em;
                height: 0.4em;
                text-align: center;
                line-height: 1.4em;
                font-size: 0.7em;
            }
		</style>
	</head>

	<body>
		<header>
			<a><span class="leftleft"></span></a>
			<h1>推送列表</h1>
		</header>
		<section>
			<ul class="mui-table-view" id="msgList">
			</ul>
		</section>

		<footer>
            <nav class="mui-bar mui-bar-tab">
                <a href="javascript:;" id="tcIndex">
                    <img src="../img/shouye2.png" />
                    <span class="mui-tab-label">首页</span>
                </a>
                <a href="javascript:;" id="myfabu">
                    <img src="../img/fabu2.png" />
                    <span class="mui-tab-label">发布</span>
                </a>
                <a class="action" href="javascript:;" id="myInfo">
                    <img src="../img/mine2.png" />
                    <span class="mui-tab-label">我的</span>
                </a>
            </nav>
        </footer>
        <script>
            $(function(){
                var msgType = getVal("msgType");
                appcan.ajax({
                    type:"post",
                    url:host+"/getUserMsgList.json?userId="+appcan.locStorage.getVal("userId")+"&msgType=2",
                    dataType:"json",
                    contentType: "application/json",
                    success : function(dataResult){
                        var msgStr = '';
                        if(dataResult.data.length>0){
                            for(var i=0;i<dataResult.data.length;i++){
                                if(dataResult.data[i].state==1){
                                    appcan.ajax({
                                        type:"post",
                                        url:host+"/changeUserMsgState.json?msgId="+dataResult.data[i].id,
                                        dataType:"json",
                                        contentType: "application/json",
                                        success : function(dataResult){
                                        }
                                     })
                                }
                                
                                 msgStr += '<li class="mui-table-view-cell mui-media">';
                                 msgStr += '<a href="javascript:;">';
                                 msgStr += '<img class="mui-media-object mui-pull-left" src="../img/tuiguang2.png">';
                                 msgStr += '<div class="mui-media-body">';
                                 msgStr += '推广消息';
                                 msgStr += '<p class="mui-ellipsis">'+dataResult.data[i].content+'</p>';
                                 msgStr += '</div>';
                                 msgStr += '</a>';
                                 msgStr += '<p class="moban_btn">';
                                 if(dataResult.data[i].actType.substring(0,1)!= 'C' && dataResult.data[i].actType.substring(0,1)!= 'D'){
                                     msgStr += '<a onclick="openUrl(\'../page/info.html?actId='+dataResult.data[i].createBy+'\',\'info\')">预览</a>';
                                 }
                                 msgStr += '<a onclick="openUrl(\'moban_shengcheng.html?actId='+dataResult.data[i].createBy+'\',\'moban_shengcheng\')">使用</a></p>';
                                 if(dataResult.data[i].state==1){
                                     msgStr += '<span class="tishi_btn"></span>';
                                 }
                                 msgStr += '</li>';
                            }
                        }
                        $("#msgList").html(msgStr);
                    }
                })
            })
        </script>
	</body>

</html>